package pl.edu.agh.ki.ewywiadowka.client.dto;

import java.util.LinkedList;

import com.google.gwt.user.client.rpc.IsSerializable;

public class TeacherDTO extends SystemUserDTO implements IsSerializable {
	
	public Integer id;
	public String surname;
	public String name;
	public String address;
	public String telephone;
	
	//jest uzytkownikiem systemu
	
	//tabela lacznikowa
	public LinkedList<SubjectDTO> subjects;

	public TeacherDTO() {}
	
	public TeacherDTO(Integer id, String surname, String name, String address,
			String telephone, UserDTO user, LinkedList<SubjectDTO> subjects) {
		super();
		this.id = id;
		this.surname = surname;
		this.name = name;
		this.address = address;
		this.telephone = telephone;
		this.user = user;
		this.subjects = subjects;
	}

	public boolean equals(TeacherDTO tdto) {
		return surname.equals(tdto.surname) && name.equals(tdto.name) && address.equals(tdto.address) && telephone.equals(tdto.telephone);
	}


	public String toString() {
		return name + " " + surname;
	}
	
}
